package priv.yiyuan.example.design.pay01;

/**
 * 信用卡支付策略
 *
 * @author YiYuan
 * @data 2025/8/8
 * @apoNote
 */
public class CreditCardPayment implements PaymentStrategy {

    private String cardNumber;

    private String name;

    public CreditCardPayment(String cardNumber, String name) {
        this.cardNumber = cardNumber;
        this.name = name;
    }

    @Override
    public void pay(double amount) {
        System.out.println("Paid " + amount + " using Credit Card: " + cardNumber);
    }
}
